home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Source.bin / PostalCode.java < prev    next >
Text File  |  1998-08-21  |  1KB  |  46 lines

  1. package symantec.itools.awt.util.edit;
  2.  
  3.  
  4. /**
  5.  *
  6.  * Creates a formatted text field for a postal code.
  7.  * PostalCode limits the type of text that can be entered in the text
  8.  * box to a postal code (a mix of 6 letters and numbers).
  9.  * Text formatting logic is applied to the user input.
  10.  * If the text field already contains text, the user can select the default text
  11.  * and delete or edit it.
  12.  *
  13.  *
  14.  * @see symantec.itools.awt.FormattedTextField
  15.  *
  16.  * @version 1.0, Nov 26, 1996
  17.  *
  18.  * @author    Symantec
  19.  *
  20.  */
  21.  
  22.  
  23. public class PostalCode
  24.     extends AddressCode
  25. {
  26.      /**
  27.      * Create postal code text field.
  28.      * This is a formatted text field
  29.      * with the following format: U9U/-9U9
  30.      */
  31.  
  32.     public PostalCode()
  33.     {
  34.         super(7);
  35.  
  36.         super.setMask("U9U/-9U9");
  37.     }
  38.  
  39.     /**
  40.      * Takes no action.  Overrides setMask in FormattedTextField to prevent
  41.      * alteration of the postal code mask.
  42.      */
  43.     public void setMask(String s)
  44.     {
  45.     }
  46. }